import java.util.Arrays;

public class Hnn {
    /*public static int[] transform(int[] array){
        int[]ret=array;
        for (int i = 0; i < ret.length; i++) {
            ret[i]=ret[i]*2;
        }
        return ret;
    }
    public static void main(String[] args) {
        int[]array={1,2,3};
        System.out.println(Arrays.toString(transform(array)));
    }*/

    //把基数排到偶数前
    /*public static void main(String[] args) {
        int[]nums=new int[]{1,2,3,4,5,6,7};
        int[]a=swap(nums);
        for (int i = 0; i < a.length; i++) {
            System.out.print(a[i]);
        }
    }
    public static int[]swap(int[] nums){
        int i=0;
        int j=nums.length-1;
        while(i<j){
            if(nums[i]%2==1){
                i++;
            }else if(nums[j]%2==0){
                j--;
            }else{
                int tmp=nums[i];
                nums[i]=nums[j];
                nums[j]=tmp;
                i++;
                j--;
            }
        }
        return nums;
    }*/


    /*public static void main(String[] args) {
        int[] arr={1,2,3,4,5,6,7};
        int target=5;
        int ret = find(arr,target);
        System.out.println("找到了:"+ret);
    }
    public static int find(int[]arr, int target){
        int l=0;int r=arr.length-1;
        while(l<=r){
            int mid=l+(r-l)/2;
            int midVal=arr[mid];
            if(midVal<target){
                //目标在mid右边，所以下一次从mid+1开始找
                l=mid+1;
            }else if(midVal>target){
                r=mid-1;
            }else{
                return mid;
            }
        }
        return -1;//没找到
    }*/

    //冒泡排序
    /*public static void main(String[] args) {
        int[] arr={4,5,1,7,9,6,20,39};
        sort(arr);
        System.out.println(Arrays.toString(arr));
    }
    public static void sort(int[] arr){
        for (int i = 0; i < arr.length-1; i++) {
            for (int j = 0; j < arr.length-1-i; j++) {
                if(arr[j]<arr[j]+1){
                    int tmp=arr[j];
                    arr[j]=arr[j+1];
                    arr[j+1]=tmp;
                }
            }
        }
    }*/

    /*public static void findIt(int[]arr,int target){
        for (int i = 0; i < arr.length; i++) {
            for (int j = 0; j < arr.length; j++) {
                if((arr[i]+arr[j])==target){
                    System.out.println("["+i+","+j+"]");
                }
            }
        }
    }

    public static void main(String[] args) {
        int[] arr={2,7,11,15};
        int target=9;
        findIt(arr,target);
    }*/

    /*public static void main(String[] args) {
        int[]arr={2,2,2,1,1,1,2,2};
        System.out.println("多数元素为:"+mooreVote(arr));
    }
    public static int mooreVote(int[]arr){
        int count =0;
        int temp=arr[0];
        for (int i = 0; i < arr.length; i++) {
            if(count==0){
                temp=arr[i];
            }else if(temp==arr[i]){
                count++;
            }else{
                count--;
            }
        }
        return temp;
    }*/

    public static void main(String[] args) {
       int[]arr1={2,6,4,1};
       int[]arr2={1,2,34,3,4,5,7,23,12};
       jiShu(arr1);
       jiShu(arr2);
    }
    public static void jiShu(int[]arr){
        int count =0;
        for (int i = 0; i < arr.length-2; i++) {
            if((arr[i]%2!=0)&&(arr[i+1]%2!=0)&&(arr[i+2]%2!=0)){
                count++;
            }
        }
        if(count>=1){
            System.out.println(true);
        }else{
            System.out.println(false);
        }
    }
}
